package com.lyj.ssm.service.impl;

import com.lyj.ssm.entity.User;
import com.lyj.ssm.mapper.UserMapper;
import com.lyj.ssm.service.ITestService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * Created by Administrator on 2018/7/12.
 */
@Service
public class TestServiceImpl implements ITestService {

    private static final Logger logger = LoggerFactory.getLogger(TestServiceImpl.class);

    @Autowired
    private UserMapper userMapper;


    @Override
    public String helloWorld(String input) {
        return "hello " + input;
    }

    @Override
    public User getUser(Long id) {
        logger.debug("用户id : {}" , id);
        User user = userMapper.getUser(id);
        logger.debug("user:",user);
        return user;
    }
}
